/*
 * Creative Commons Deed
 * Attribution-NonCommercial-ShareAlike 1.0 Finland
 * 
 * You are free:
 * 
 * * to copy, distribute, display, and perform the work
 * * to make derivative works
 * Under the following conditions:
 * 
 * Attribution. You must attribute the work in the manner specified by the author or licensor.
 * 
 * Noncommercial. You may not use this work for commercial purposes.
 * 
 * Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only 
 * under a license identical to this one.
 * 
 * * For any reuse or distribution, you must make clear to others the license terms of this work.
 * * Any of these conditions can be waived if you get permission from the copyright holder.
 * Your fair use and other rights are in no way affected by the above.
 * This is a human-readable summary of the Legal Code (the full license). 
 */
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using PocketLibrary;

namespace PocketApps
{
    public partial class Tietoja : Form
    {

        public Tietoja()
        {
            InitializeComponent();
        }

        private void linkLabel1_Click(object sender, EventArgs e)
        {
            try
            {
                VisitLink();
            }
            catch (Exception)
            {
                MessageBox.Show("Unable to open link that was clicked.");
            }
        }

        private void VisitLink()
        {
            System.Diagnostics.ProcessStartInfo myInfo = new System.Diagnostics.ProcessStartInfo();
            myInfo.UseShellExecute = true;
            myInfo.FileName = linkLabel1.Text;
            System.Diagnostics.Process.Start(myInfo);
        }

        private void Tietoja_Load(object sender, EventArgs e)
        {
            DpiHelper.AdjustAllControls(this);
            label4.Text = string.Format("Release {0}\n", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
            label4.Text += string.Format("Base library release {0}\n", PocketLibrary.MainClass.GetVersion().ToString());
        }

    }
}